package de.tum.in.eist.poll.pub.service;


import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

import de.tum.in.eist.poll.pub.shared.Feedback;
import de.tum.in.eist.poll.pub.shared.FeedbackExtended;
import de.tum.in.eist.poll.pub.shared.Lecture;
import de.tum.in.eist.poll.pub.shared.User;


/**
 * The async counterpart of {@link PollService}.
 */
public interface PollServiceAsync {
	
	/**
	 * The async counterpart of {@link PollService#login(String, String)}.
	 */
	void login(String name, String password, AsyncCallback<User> callback)
			throws IllegalArgumentException;
	
	/**
	 * The async counterpart of {@link PollService#requestLectures(User)}.
	 */
	void requestLectures(User user, AsyncCallback<List<Lecture>> callback);
	
	/**
	 * The async counterpart of {@link PollService#requestFeedback(Lecture)}.
	 */
	void requestFeedback(Lecture lecture, AsyncCallback<List<Feedback>> callback);
	
	/**
	 * The async counterpart of {@link PollService#submitFeedback(Feedback)}.
	 */
	void submitFeedback(FeedbackExtended feedback, AsyncCallback<String> callback);
	
}
